function  Tab(el){
    this.el = document.querySelector(el)
    this.init()
}

Tab.prototype.init = function(){
    this.changetab()
}

Tab.prototype.changetab = function(){
    let allulli = this.el.querySelectorAll("ul li")
    allulli.forEach((item,index)=>{
        item.onmouseover = ()=>{
            this.changetop(index)
            this.changecontent(index)
        }
    })
}

Tab.prototype.changetop = function(num){
    this.el.querySelector("ul li.active").className = ""
    this.el.querySelector(`ul li:nth-of-type(${num+1})`).className = "active"
}

Tab.prototype.changecontent = function(num){
    this.el.querySelector("ol li.active").className = ""
    this.el.querySelector(`ol li:nth-of-type(${num+1})`).className = "active"
}